package top.zsyle.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import top.zsyle.domain.User;
import top.zsyle.fallback.UserServiceFallbackFactory;

@FeignClient(name = "user-server",path = "user",contextId = "userService",fallbackFactory = UserServiceFallbackFactory.class)
public interface UserService {

    @GetMapping(value = "/{id}")
    User getUserById(@PathVariable Long id);
}
